package com.bilisummarize.bean;

public class ResponseType {
    private Object data;
    private String message;

    private Boolean success;

    public ResponseType(){

    }

    public ResponseType(Object data, String message){
        this.data = data;
        this.message = message;
    }

    public ResponseType(String message){
        this.data = null;
        this.message = message;
    }

    public ResponseType success(Object data, String message){
        this.data = data;
        this.message = message;
        this.success = true;
        return this;
    }
    public ResponseType success(String message){
        this.message = message;
        this.success = true;
        return this;
    }
    public ResponseType failure(String message){
        this.message = message;
        this.success = false;
        return this;
    }
    public ResponseType failure(Object data, String message){
        this.data = data;
        this.message = message;
        this.success = false;
        return this;
    }


    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Boolean getSuccess() {
        return success;
    }

    public void setSuccess(Boolean success) {
        this.success = success;
    }
}
